package com.cl.iterator;

public class MenuTestDrive {
    public static void main(String[] args) {
        MenuItem[] items={
                new MenuItem("qw",12),
                new MenuItem("ef",4),
                new MenuItem("gt",3),
                new MenuItem("bg",6)
        };
        DinerMenuIterator dinerMenuIterator = new DinerMenuIterator(items);
        print(dinerMenuIterator);
    }

    static void print(Iterator iterator) {
        while (iterator.hasNext()) {
            System.out.println(iterator.next().toString());
        }
    }
}
